package cn.edu.scau.cmi.zhuangzhihong.comprehensiveness;

import cn.edu.scau.cmi.zhuangzhihong.abstractFactory.Client;
import cn.edu.scau.cmi.zhuangzhihong.factory.main;
import cn.edu.scau.cmi.zhuangzhihong.factorymethod.mainapp;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;

public class viewController {
	@FXML
	private Button singletonmodel;
	@FXML
	private Button singletonmodel2;
	@FXML
	private Button factory;
	@FXML
	private Button factorymethod;
	@FXML
	private Button adapter;
	@FXML
	private Button adapter2;
	@FXML
	private Button safe;
	@FXML
	private Button consistence;
	@FXML
	private Button hibernate;
	@FXML
	private Button spring;

	public void ChangeSingletonmodel() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/singletonmodel/view.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
	
	public void Changefactory() throws Exception {
		cn.edu.scau.cmi.zhuangzhihong.factory.main m = new main();
		m.showWindow(); 
}
	
	public void Changefactorymethod() throws Exception {
		mainapp ma = new mainapp();
		ma.showWindow();
		 
}
	public void ChangeAbstractfactory() throws Exception {
		Client c = new Client();
		c.showWindow();
		 
}
	public void Changeadapter() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/adapter/scence.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
	
	public void Changesafe() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/composite/safe/view.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
	
	public void Changeconsistence() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/composite/consistence/view.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
	
	public void Changehibernate() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/hibernate/client/view.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
	
	public void Changespring() throws Exception {
		 
		  Parent target = FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/zhuangzhihong/client/view.fxml"));
		  Scene scene = new Scene(target); 
		  Stage stg=new Stage();
		  stg.setScene(scene); 
		  stg.show(); 		
}
}
